package com.w.proxy.player.playerproxy.aop;

import org.springframework.aop.ThrowsAdvice;

import java.lang.reflect.Method;

/**
 * @author wangyiwen
 * @date 2018-10-30
 */
public class LoLPlayerThrowAdvice implements ThrowsAdvice {

    // 接口没有声明方法，需要手动填写。具体可以查看源码注释
    public void afterThrowing(Method method, Object[] args, Object target, Exception e) {
        System.out.println("---------- Throw Exception ----------");
        System.out.println("Target Class: " + target.getClass().getName());
        System.out.println("Method Name: " + method.getName());
        System.out.println("Exception Message: " + e.getMessage());
        System.out.println("-------------------------------------");

    }
}
